[openVPN] server & client on same machine . And multiple VPN servers

Posted by HiWorld on Server Fault See other posts from Server Fault or by HiWorld
Published on 2010-06-01T04:55:32Z Indexed on 2010/06/01 5:03 UTC
Read the original article Hit count: 164

Filed under:
|
|
|

Hello everyone,

im stucked configuring openvpn to build a multi vpn connection. like this:

CLIENT -> VPN1 -> VPN2 -> INTERNET

Well, i already have and know how to done a normal sigle vpn but want to use a chain of vpns, so i explain what i have done and how i did it.

ON VPN1.

  • i have 1 openvpn instance running as server( where client connect to) and another as client connecting to VPN2 running as server. { Here comes the problem } when i connect VPN1 as client of VPN2 i cant connect to VPN1 from CLIENT, my question is HOW TO procced with this...
  • Also have another third instance working as server to use VPN1 without chains.

ON VPN2.

  • 1 openvpn instance as server where VPN1 will connect and then forward to the NET.

Im using TUN interface on configs.

And iptables are on this way:

VPN1 - openvpn ip server1 : 192.168.6.0 / ip as client of VPN2: 192.168.5.70

iptables -t nat -A POSTROUTING -s 192.168.6.0 -j SNAT --to-source 192.168.5.70

VPN2 - openvpn ip server2 : 192.168.5.0

iptables -t nat -A POSTROUTING -s 192.168.5.0/24 -j SNAT --to-source EXTERNAL_IP_TO_INTERNET

Hope someone help me with this. thanks in advance

© Server Fault or respective owner

Related posts about vpn

Related posts about iptables